<seed-content class=" gray-background">
  <seed-toolbar-header>
    <seed-toolbar-title>{{dataStore.pageTitle}}</seed-toolbar-title>
    <seed-toolbar-menu></seed-toolbar-menu>
  </seed-toolbar-header>
  <div class="remark-detail gray-background">
    <div class="seed-gap"></div>
    <h1 class="lesson-title" *ngIf="remark?.subjectName">课时：{{remark?.subjectName}}</h1>
    <div class="remark-header  seed-flexbox seed-flexbox-align-center">
      <seed-avatar [lazyLoadAvatar]="dataStore.avatar" *ngIf="dataStore.avatar"></seed-avatar>
      <seed-avatar [lazyLoadAvatar]="dataStore.avatar" *ngIf="!dataStore.avatar"></seed-avatar>
      <span class="nick text-ellipsis">{{dataStore.name}}</span>
    </div>
    <div class="remark-content" *ngIf="dataStore.identityType === 'teacher'
    || dataStore.identityType === 'parent' && remark?.content">
      <div class="remark-text">
        <seed-textarea-form
          width="100%"
          height="240"
          placeMark="对该学员本节课的表现做个评价吧"
          maxQuantity="500"
          text="{{remark?.content}}"
          (textChange)="handleRemarkText($event)"
          [readonly]="stateStore.isView"
        ></seed-textarea-form>
      </div>
      <div class="remark-image">
        <div class="image-item" *ngFor="let picture of teacherParams.filesList;let i = index">
          <seed-img [lazyLoadImg]="picture"
                    [background]="'true'">
          </seed-img>
          <i class="remove-btn" (click)="removePicture(i)" *ngIf="!stateStore.isView"></i>
        </div>
        <div class="image-item  add-image seed-flexbox seed-flexbox-align-center seed-flexbox-content-center"
             *ngIf="!stateStore.isView&&teacherParams.filesList.length<9">
            <div class="content seed-flexbox seed-flexbox-align-center seed-flexbox-content-center">
              <i></i>
              <p>点此上传</p>
              <input type="file" (change)="addPicture($event)">
            </div>
        </div>
      </div>
    </div>
    <div class="no-data" *ngIf="dataStore.identityType === 'parent' && (!remark || !remark.content)" >
      <seed-default-graph [url]="'noData'"></seed-default-graph>
    </div>
  </div>
</seed-content>
<footer>
  <seed-submit-button class="seed-scroll-outside"
                      (submit)="handleUpdateRemark()" [btnText]="'确定'"
                      [disabled]="!stateStore.isValid"
                      *ngIf="!stateStore.isView">
  </seed-submit-button>
  <div class="btn-wrap seed-flexbox seed-flexbox-align-center"
       *ngIf="dataStore.identityType==='teacher'&&stateStore.isView">
    <button (click)="resetRemarkState()">编辑</button>
    <button (click)="removeRemark()">删除</button>
  </div>
</footer>
